import Promise from 'promise-polyfill'
if (!window.Promise) {
	window.Promise = Promise;
}

import dva from 'dva';
import { browserHistory } from 'dva/router';
import './index.html';
import './index.less';
import './assets/iconfont/iconfont.css';

// 1. Initialize
const app = dva({
  history: browserHistory,
});

// 3. Model
app.model(require('./models/meyley'));
app.model(require('./models/address'));
app.model(require('./models/buycar'));
app.model(require('./models/order'));
app.model(require('./models/goods'));

// 4. Router
app.router(require('./router'));

// 5. Start
app.start('#root');